//
//  LcbSystem.m
//  lcb
//
//  Created by lcb on 16/7/7.
//  Copyright © 2016年 wry. All rights reserved.
//

#import "LcbSystem.h"
#import <UIKit/UIKit.h>

@implementation LcbSystem
LcbSingletonM(LcbSystem)
+(void)email:(NSString*)mailaddress
{
    if (mailaddress==nil||mailaddress.length==0) {
        return;
    }
    NSString*mailurl = [NSString stringWithFormat:@"mailto://%@",mailaddress];
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:mailurl]];
    return;
}
+(void)phone:(NSString*)phoneNum
{
    if (phoneNum==nil||phoneNum.length==0) {
        return;
    }
    NSString*phoneurl = [NSString stringWithFormat:@"tel://%@",phoneNum];
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:phoneurl]];
    return;
}
+(void)sms:(NSString*)smsNum
{
    if (smsNum==nil||smsNum.length==0) {
        return;
    }
    NSString*smsurl = [NSString stringWithFormat:@"sms://%@",smsNum];
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:smsurl]];
    return;
}
+(void)brower:(NSString*)url
{
    if (url==nil||url.length==0) {
        return;
    }
    NSString*browerurl = [NSString stringWithFormat:@"%@",url];
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:browerurl]];
    return;
}

@end
